import 'package:flutter/material.dart';
import 'package:message_tools/config/constants.dart';

export 'package:message_tools/config/constants.dart';

class AppBarPlugin {
  static AppBar Create(String title,
      {bool centerTitle,
      Color backgroundColor,
      Color fontColor,
      Widget leading,
      List<Widget> actions}) {
    if (backgroundColor == null) {
      backgroundColor = Constants.navBarBackgroundColor;
    }

    if (fontColor == null) {
      fontColor = Constants.navBarFontColor;
    }

    return AppBar(
        title: Text(title, style: TextStyle(color: fontColor)),
        centerTitle: centerTitle,
        backgroundColor: backgroundColor,
        leading: leading,
        actions: actions);
  }
}
